﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Micro.Core.ServiceDiscovery
{
    public class ConsulServiceResult
    {
        /// <summary>
        /// 数据ID，同一个服务ID应该一样
        /// </summary>
        public string ID { get; set; }

        /// <summary>
        /// 注册机器地址
        /// </summary>
        public string Address { get; set; }

        /// <summary>
        /// 服务创建的下标
        /// </summary>

        public int CreateIndex { get; set; }

        /// <summary>
        /// 服务修改的下标
        /// </summary>
        public int ModifyIndex { get; set; }

        /// <summary>
        /// 数据中心
        /// </summary>
        public string Datacenter { get; set; }

        /// <summary>
        /// 集群节点
        /// </summary>
        public string Node { get; set; }

        /// <summary>
        /// 服务实例ID，同一个服务会有多个实例
        /// </summary>
        public string ServiceID { get; set; }

        /// <summary>
        /// 服务名称
        /// </summary>
        public string ServiceName { get; set; }

        /// <summary>
        /// 服务host地址
        /// </summary>
        public string ServiceAddress { get; set; }

        /// <summary>
        /// 服务端口号
        /// </summary>
        public string ServicePort { get; set; }

        /// <summary>
        /// 服务标签
        /// </summary>
        public string[] ServiceTags { get; set; }

        /// <summary>
        /// 服务tag是否允许覆盖
        /// </summary>
        public bool ServiceEnableTagOverride { get; set; }
    }
}
